package mkz.labyrinth3D.game;

/**
 * Game levels.
 * 0 - hole
 * 1 - floor
 * 2 - wall
 * 3 - gem
 * 4 - start
 * 
 * @author Hans
 */
public class LevelMaps
{
    /**Level 1*/
    private static final int[][] level1 = new int[][]
    {
        new int[]{2, 2, 2, 2, 2, 2, 2},
        new int[]{2, 0, 0, 3, 0, 0, 2},
        new int[]{2, 0, 3, 3, 3, 0, 2},
        new int[]{2, 3, 3, 4, 3, 3, 2},
        new int[]{2, 0, 3, 3, 3, 0, 2},
        new int[]{2, 0, 0, 3, 0, 0, 2},
        new int[]{2, 2, 2, 2, 2, 2, 2},
    };
    
    /**Level 2*/
    private static final int[][] level2 = new int[][]
    {
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
        new int[]{2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2},
        new int[]{2, 3, 0, 3, 0, 3, 0, 3, 2, 2, 2, 2, 2, 1, 2, 0, 0, 0, 0, 1, 2},
        new int[]{2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 2, 3, 3, 3, 0, 1, 2},
        new int[]{2, 3, 0, 3, 0, 3, 0, 3, 3, 3, 4, 3, 3, 1, 2, 3, 0, 3, 1, 1, 2},
        new int[]{2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 2, 3, 3, 3, 0, 1, 2},
        new int[]{2, 3, 0, 3, 0, 3, 0, 3, 2, 2, 2, 2, 2, 1, 2, 0, 0, 0, 0, 1, 2},
        new int[]{2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2},
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
    };
    
    /**Level 3*/
    private static final int[][] level3 = new int[][]
    {
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
        new int[]{2, 3, 3, 3, 3, 3, 1, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 1, 0, 2},
        new int[]{2, 3, 0, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 2},
        new int[]{2, 3, 3, 3, 2, 0, 3, 1, 0, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2},
        new int[]{2, 3, 2, 2, 2, 0, 0, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2},
        new int[]{2, 3, 2, 3, 2, 1, 1, 1, 0, 2, 1, 2, 2, 2, 2, 1, 0, 0, 1, 2},
        new int[]{2, 1, 1, 1, 2, 1, 2, 4, 2, 2, 1, 2, 3, 3, 2, 3, 1, 1, 1, 2},
        new int[]{2, 0, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 2, 2, 2, 1, 2},
        new int[]{2, 0, 1, 2, 1, 1, 1, 0, 3, 2, 1, 2, 3, 3, 1, 1, 1, 2, 1, 2},
        new int[]{2, 2, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2},
        new int[]{2, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2},
        new int[]{2, 1, 1, 2, 3, 0, 1, 0, 3, 2, 3, 1, 1, 2, 1, 1, 1, 1, 3, 2},
        new int[]{2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 2},
        new int[]{2, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 2},
        new int[]{2, 1, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 0, 2, 2, 1, 2, 3, 2},
        new int[]{2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 1, 3, 1, 1, 2, 1, 1, 2, 3, 2},
        new int[]{2, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 0, 2, 2, 2, 1, 2, 2, 3, 2},
        new int[]{2, 0, 3, 0, 2, 0, 1, 2, 1, 2, 3, 1, 2, 1, 1, 1, 1, 2, 3, 2},
        new int[]{2, 0, 0, 0, 2, 3, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 3, 3, 3, 2},
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
    };
    
    /**Level 4*/
    private static final int[][] level4 = new int[][]
    {
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
        new int[]{2, 1, 4, 2, 1, 3, 0, 3, 1, 0, 1, 3, 0, 3, 1, 0, 1, 3, 0, 2},
        new int[]{2, 1, 2, 2, 1, 0, 0, 0, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2},
        new int[]{2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2},
        new int[]{2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2},
        new int[]{2, 0, 1, 0, 0, 0, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2},
        new int[]{2, 0, 1, 0, 3, 1, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2},
        new int[]{2, 0, 1, 0, 1, 0, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2},
        new int[]{2, 0, 1, 0, 3, 1, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 2},
        new int[]{2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 3, 0, 3, 3, 3, 3, 3, 0, 3, 2},
        new int[]{2, 0, 1, 0, 3, 1, 3, 0, 3, 0, 3, 0, 3, 0, 0, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 0, 1, 0, 0, 0, 3, 0, 3, 0, 3, 3, 3, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 0, 3, 1, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 3, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 1, 1, 1, 1, 0, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 2},
        new int[]{2, 0, 1, 1, 1, 0, 1, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 2},
        new int[]{2, 0, 3, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2},
        new int[]{2, 0, 0, 0, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2},
        new int[]{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
    };
    
    /**
     * Returns number of levels.
     * @return number of levels
     */
    public static int getLevelCount()
    {
        return 4;
    }
    
    /**
     * Returns level by ID
     * @param idx   ID
     * @return      level
     */
    public static int[][] getLevel(int idx)
    {
        switch(idx)
        {
            case 0 :
                return level1;
            case 1 :
                return level2;
            case 2 :
                return level3;
            case 3 :
                return level4;
            default :
                return level1;
        }
    }
}
